define(function (require, exports, module) {

  require("mixins/global.mixins.js");
  var mCard = require('andrew/card/index.js');
  var toastr = require("third/toastr/index.js");

  var api = require('service/api.js');

  var urlHelper = require("../src/tools/urlHelper.js");
  var param = urlHelper.getUrlParamsMap();

  var pageVue = new Vue({
    data: {
      exist: [],
      error: [],
      fullscreenLoading: false
    },
    mounted: function () {
    },
    methods: {
      handleSuccess: function (res, file, fileList) {
        console.log(res);
        this.fullscreenLoading = false;
        if(res.msg != 'success'){
          toastr.error(res.msg);
        } else {

          toastr.success("成功解析文件并导入");
          $(".shuoming").show();
          this.exist = res.exist;
          this.error = res.error;
          if(res.exist.length == 0){
            $("#exist").hide();
          }
          if(res.error.length == 0){
            $("#error").hide();
          }
        }
      },
      handleBefore: function(file){
        toastr.info("文件解析中，请耐心等待，时间由文件大小决定");
        this.fullscreenLoading = true;
      },
      handleError: function (err, file, fileList) {
        this.fullscreenLoading = false;
        console.log(err);
        toastr.error("网络问题，请稍后再试");
      }

    }
  }).$mount('#appInfo')
})
